package com.app.model.bean;


import android.location.Location;

import com.app.constant.Constants;

import java.io.Serializable;

/**
 * 作者： Ryan
 * 描述：
 * 创建时间：2015/3/30 14:08.
 */
public class LocationDetails implements Serializable {
    public double latitude = 39.92;//纬度
    public double longitude = 116.46;//经度
    public int describeContents;
    public String addrStr;
    public double altitude;//海拔
    public String city;
    public String cityCode;
    public String coorType;
    public float direction;
    public String district;
    public String networkLocationType;
    public int locType;
    public String province;
    private String street;
    private String streetNumber;
    private String errorMessage;
    /**
     * 位置信息的获取时间
     */
    private long amfSaveTime;
    /**
     * 详细地址(街道和门牌号)
     */
    private String detailAddress;

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public long getAmfSaveTime() {
        return amfSaveTime;
    }

    public void setAmfSaveTime(long amfSaveTime) {
        this.amfSaveTime = amfSaveTime;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public int getDescribeContents() {
        return describeContents;
    }

    public void setDescribeContents(int describeContents) {
        this.describeContents = describeContents;
    }

    public String getAddrStr() {
        return addrStr;
    }

    public void setAddrStr(String addrStr) {
        this.addrStr = addrStr;
    }

    public double getAltitude() {
        return altitude;
    }

    public void setAltitude(double altitude) {
        this.altitude = altitude;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getCoorType() {
        return coorType;
    }

    public void setCoorType(String coorType) {
        this.coorType = coorType;
    }

    public float getDirection() {
        return direction;
    }

    public void setDirection(float direction) {
        this.direction = direction;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getNetworkLocationType() {
        return networkLocationType;
    }

    public void setNetworkLocationType(String networkLocationType) {
        this.networkLocationType = networkLocationType;
    }

    public int getLocType() {
        return locType;
    }

    public void setLocType(int locType) {
        this.locType = locType;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    public String getStreetNumber() {
        return streetNumber;
    }

    public void setStreetNumber(String streetNumber) {
        this.streetNumber = streetNumber;
    }

    public String getDetailAddress() {
        return detailAddress;
    }

    public void setDetailAddress(String detailAddress) {
        this.detailAddress = detailAddress;
    }

    @Override
    public boolean equals(Object o) {

        if (o == null || !(o instanceof Location)) {
            return false;
        }

        LocationDetails another = ((LocationDetails) o);
        double oLat = another.latitude;
        double oLon = another.longitude;
        if (latitude == oLat && longitude == oLon) {
            return true;
        }
        return super.equals(o);
    }

    @Override
    public String toString() {
        if (!Constants.DEBUG) {
            return super.toString();
        }
        return "LocationDetails{" +
                "latitude=" + latitude +
                ", longitude=" + longitude +
                ", describeContents=" + describeContents +
                ", addrStr='" + addrStr + '\'' +
                ", altitude=" + altitude +
                ", city='" + city + '\'' +
                ", cityCode='" + cityCode + '\'' +
                ", coorType='" + coorType + '\'' +
                ", direction=" + direction +
                ", district='" + district + '\'' +
                ", networkLocationType='" + networkLocationType + '\'' +
                ", locType=" + locType +
                ", province='" + province + '\'' +
                ", street='" + street + '\'' +
                ", streetNumber='" + streetNumber + '\'' +
                ", amfSaveTime=" + amfSaveTime +
                '}';
    }
}
